Skip to content

Conversation

zhoucy16
Copy link

start

# user = auth.authenticate(username=username,password=password)
# auth.login(self.request, user)
# except:
# raise ValidateError("System error!")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注释掉的代码没有清理。

if Ticket.objects.filter(student_id = self.user.student_id, activity = activity, status = Ticket.STATUS_USED):
return self.reply_text('您已经抢过该活动的票且使用过')
if activity.remain_tickets == 0:
return self.reply_text('没有多的票了!请自行尝试劝退抢到票的朋友们~')
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改为<0比较保险,避免余票数小于0的意外情况发生时继续出票。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant